<template>
	<el-container style="padding: 5px">
		<el-space :fill="fill" wrap>
			<el-card v-for="item in list.procedures" :key="item.id">
				<div style="font-size: 25px;">
					{{item.name}} ({{item.remake}})
					<el-button type="primary" @click="showTask(item)">查看详情</el-button>
				</div>
			</el-card>
		</el-space>
	</el-container>

</template>

<script>


	export default {
		name: 'listCrud',
		components: {

		},
		data() {
			return {
				dialog:{
					save: false,
					info: false
				},
				list: {
					procedures: []
				},
				fill: true,
				activeName: '',
				selection: []
			}
		},
		mounted() {
			this.getList()
		},
		methods: {
			async getList() {
				var res = await this.$API.workshop.list.get();
				console.log(res)
				this.list.procedures = res.data
			},

			showTask(item) {
				this.$router.push({
					path: '/task/procedure/list',
					query: {
						name: item.name
					}
				})
			},
			//页面新增
			addPage(){
				this.$router.push({
					path: '/template/list/crud/detail',
				})
			},
			
		}
	}
</script>

<style>
</style>
